package com.springcloud.prodecer.controller;

import com.springcloud.prodecer.client.CustomerFeignClient;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Wangzhiwen
 */
@RestController
@RequestMapping("/producer")
@RequiredArgsConstructor
public class ProducerController {

    private final CustomerFeignClient customerFeignClient;

    @GetMapping("/test1")
    public Map<String, Object> test12(@RequestParam("var") String var) {
        Map<String, Object> result = customerFeignClient.test1();
        result.put("result", var);
        return result;
    }

}
